﻿$OFS = ", "
# Initialize an empty array
$arr = @()
write "`$arr is empty, it has $($arr.length) items."

# You can add to an array using the + or += operator
$arr2 = $arr + 1
$arr2 += 2
write "$arr2"

# Arrays are polymorphic
$arr2 += "three"
write "$arr2"

# Using sequences
$arr = 1, 2
$arr += "three", "four"
write "$arr"

# Access elements by index
write "The 2nd element is $($arr[1])"
